#ifndef __UI_INSTRUCTION_IMP_H
#define __UI_INSTRUCTION_IMP_H

#include "UIInstruction.h"

void InitInstructionMap();

struct ShellCmdEntry
{
    UIInstruction *inst;
};

#define REGISTER_INSTRUCTION(_inst)         const ShellCmdEntry _shellCmd_##_inst \
                                                __attribute__((used)) \
                                                __attribute__((section("shell_cmd"))) = { \
                                                .inst = new _inst, \
                                            }

class DemoCmd: public UIInstruction
{
private:
    /* data */
public:
    DemoCmd();
    ~DemoCmd() = default;

    virtual void Execute(std::vector<std::string> &args);
};

class ConfigReadCmd: public UIInstruction
{
private:
    /* data */
public:
    ConfigReadCmd();
    ~ConfigReadCmd() = default;

    virtual void Execute(std::vector<std::string> &args);
};

class ExitCmd: public UIInstruction
{
private:
    /* data */
public:
    ExitCmd();
    ~ExitCmd() = default;

    virtual void Execute(std::vector<std::string> &args);
};

class HelpCmd: public UIInstruction
{
private:
    /* data */
public:
    HelpCmd();
    ~HelpCmd() = default;

    virtual void Execute(std::vector<std::string> &args);
};

#endif